package com.treeroot.treenet.protocol.abs.tcp.decode;

import lombok.Getter;

/**
 * Description: 解码后消息结构
 * Create By TreeRoot
 * Create Time: 2025/06/02 07:50
 * Class Name: DecodedMessage
 *
 * @author TreeRoot
 */

@Getter
public class DecodedMessage {

    /**
     * 魔数
     */
    private final short magic;
    /**
     * 版本
     */
    private final byte version;
    /**
     * 编码解码方式
     */
    private final byte encoding;
    /**
     * 消息体
     */
    private final String payload;
    /**
     * 消息类型
     */
    private final String type;

    public DecodedMessage(short magic, byte version, byte encoding, String payload, String type) {
        this.magic = magic;
        this.version = version;
        this.encoding = encoding;
        this.payload = payload;
        this.type = type;
    }

}